<%--
  Created by IntelliJ IDEA.
  User: hasee
  Date: 2018/4/27
  Time: 21:09
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>add</title>
</head>
<body>
    <%
        int num = Integer.parseInt(request.getParameter("add"));
        int add = 0;

        for (int i = 1;i <= num;i++) {
            add = add + i;
        }

    %>
    <p>1~100之间连续和为:<%out.write("1~" + num + "和为:"+add);%></p>
</body>
</html>
